package org.kmfdm.horrorscope.core.dao;

import java.io.Serializable;
import java.util.List;


import org.springframework.transaction.annotation.Transactional;

public interface GenericDAO<T,ID extends Serializable> {

	//public Session getManager();

	@Transactional
	public void delete(T entity);

	@SuppressWarnings("unchecked")
	@Transactional
	public List<T> getAll();

	@SuppressWarnings("unchecked")
	@Transactional
	public T get(ID id);

	@Transactional
	public void saveOrUpdate(T entity);

	@Transactional
	public void update(T entity);

	@SuppressWarnings("unchecked")
	@Transactional
	public List<T> search(Object... c);

}